/**
 * 
 */
package messaage;

import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;

/**
 * @author Olga
 *
 */
public class EditPostMsg extends Message{

	protected String forumID;
	protected String postID;
	protected String content;
	protected String username;
	

	public EditPostMsg(String userN, String _forumID, String _postID, String _content) {
		this.forumID = _forumID;
		this.postID = _postID;
		this.content = _content;
		this.username = userN;
		this.type = "EditPostMsg";
	}

	@Override
	public String toString() {
		XStream xstream = new XStream(new DomDriver());
		String xml = xstream.toXML(this)+"\0";
		
		return xml;
	}

	public int getForumID() {
		return Integer.parseInt(this.forumID);
	}

	public int getPostID() {
		return Integer.parseInt(postID);
	}

	/**
	 * @return the content
	 */
	public String getContent() {
		return content;
	}

	/**
	 * @return the username
	 */
	public String getUsername() {
		return username;
	}

	/**
	 * @param username the username to set
	 */
	public void setUsername(String username) {
		this.username = username;
	}

	/**
	 * @param forumID the forumID to set
	 */
	public void setForumID(String forumID) {
		this.forumID = forumID;
	}

	/**
	 * @param postID the postID to set
	 */
	public void setPostID(String postID) {
		this.postID = postID;
	}

	/**
	 * @param content the content to set
	 */
	public void setContent(String content) {
		this.content = content;
	}

	
}
